package spec.liyan.unit3.tast3_1;

public class FinanceInfo {
    private String companyName;     //公司名称
    private double earnestIncome;   //订金收入
    private double dopositIncome;   //押金收入
    private double rentIncome;      //租金收入
    private double otherIncome;     //其他收入
    private double staffCost;       //员工成本
    private double rentCost;        //店面房租
    private double hydropwerCost;   //水电成本
    private double taxCost;         //税收费用
    private double otherCost;       //其他费用

    //以下为getXXX和setXXX方法
    public String getCompanyName() {
        return companyName;
    }

    public double getEarnestIncome() {
        return earnestIncome;
    }

    public void setEarnestIncome(double earnestIncome) {
        this.earnestIncome = earnestIncome;
    }
    public double getDopositIncome() {
        return dopositIncome;
    }

    public void setDopositIncome(double dopositIncome) {
        this.dopositIncome = dopositIncome;
    }

    public double getRentIncome() {
        return rentIncome;
    }

    public void setRentIncome(double rentIncome) {
        this.rentIncome = rentIncome;
    }

    public double getOtherIncome() {
        return otherIncome;
    }

    public void setOtherIncome(double otherIncome) {
        this.otherIncome = otherIncome;
    }
    public double getStaffCost(){
        return staffCost;
    }

    public void setStaffCost(double staffCost) {
        this.staffCost = staffCost;
    }

    public double getRentCost() {
        return rentCost;
    }

    public void setRentCost(double rentCost) {
        this.rentCost = rentCost;
    }

    public double getHydropwerCost() {
        return hydropwerCost;
    }

    public void setHydropwerCost(double hydropwerCost) { this.hydropwerCost = hydropwerCost; }

    public double getTaxCost() {
        return taxCost;
    }
    public void setTaxCost(double taxCost) {
        this.taxCost = taxCost;
    }

    public double getOtherCost() {
        return otherCost;
    }

    public void setOtherCost(double otherCost) {
        this.otherCost = otherCost;
    }
    //收入计算
    public double calIncome(){
        double sumIncome=earnestIncome+dopositIncome+rentIncome+otherIncome;
        return sumIncome;
    }
    //计算成本
    public double calCost(){
        double sumCost=staffCost+rentCost+hydropwerCost+taxCost+otherCost;
        return sumCost;
    }
    //净收入计算
    public double calNetIncome() {
        System.out.println(companyName + "的净收入计算结果:");
        double netIncome = calIncome() - calCost();
        return netIncome;
    }

    public void setCompanyName(String companyName) {
    }
}
